#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

pii a[7];
bool check() {
  rep(i, 1, 6) if (a[i].first > a[i].second) swap(a[i].first, a[i].second);
  sort(a + 1, a + 6 + 1);

  for (int i = 1; i <= 6; i += 2)
    if (a[i] != a[i + 1]) return false;

  if (a[1].first != a[3].first) return false;
  if (pii(a[1].second, a[3].second) != a[5]) return false;
  return true;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  while (cin >> a[1].first) {
    cin >> a[1].second;
    rep(i, 2, 6) cin >> a[i].first >> a[i].second;
    cout << (check() ? "POSSIBLE" : "IMPOSSIBLE") << endl;
  }
  return 0;
}